﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace BostonAzureSite.ViewHelpers
{
    public class TimeZoneTranslator
    {
        public static DateTime GetLocalTimeFromUtcTime(DateTime utcTime, TimeZoneInfo targetTimeZone)
        {
            System.Diagnostics.Debug.Assert(utcTime.Kind != DateTimeKind.Local); // the only one we KNOW is wrong
            return utcTime + targetTimeZone.BaseUtcOffset;
        }
    }
}